/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author hancing
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface DpIndicator extends BasicModel<DpIndicator> {
  createTime?: string; // 创建时间
  updateTime?: string; // 更新时间
  deleteTime?: string; // 删除时间
  name?: string; // 指标名称
  indicatorClassificationId?: string; // 指标分类
  indicatorKey?: string; // 指标键
}

export const dpIndicatorList = (params?: DpIndicator | any) =>
  defHttp.get<DpIndicator>({ url: adminPath + '/dp/zhibiao/dpIndicator/list', params });

export const dpIndicatorListData = (params?: DpIndicator | any) =>
  defHttp.post<Page<DpIndicator>>({ url: adminPath + '/dp/zhibiao/dpIndicator/listData', params });

export const dpIndicatorForm = (params?: DpIndicator | any) =>
  defHttp.get<DpIndicator>({ url: adminPath + '/dp/zhibiao/dpIndicator/form', params });

export const dpIndicatorSave = (params?: any, data?: DpIndicator | any) =>
  defHttp.postJson<DpIndicator>({ url: adminPath + '/dp/zhibiao/dpIndicator/save', params, data });

export const dpIndicatorDelete = (params?: DpIndicator | any) =>
  defHttp.get<DpIndicator>({ url: adminPath + '/dp/zhibiao/dpIndicator/delete', params });
